package com.developer.platform.application.query.dto;

import com.developer.platform.infrastructure.enums.LoginType;
import com.developer.platform.infrastructure.enums.SourceEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.constraints.NotNull;

/**
 * @author ：qiaoliang
 * @date ：2020-11-09
 */
@ApiModel("登录请求模型")
public class LoginQuery {
    @ApiModelProperty(value = "标识（手机号 邮箱 用户名或第三方应用的唯一标识）",required = true)
    @NotNull(message = "用户名不能为空！")
    private Object principal;
    @ApiModelProperty(value = "密码凭证（站内的保存密码，站外的不保存或保存token）",required = true)
    @NotNull(message = "密码凭证不能为空！")
    private Object credentials;
    @ApiModelProperty(value = "登录类型",required = true)
    @NotNull(message = "登录类型不能为空！")
    private LoginType loginType;
    @ApiModelProperty(value = "登录来源")
    private SourceEnum source;
    @ApiModelProperty(value = "IP")
    private String ip;

    public Object getPrincipal() {
        return principal;
    }

    public void setPrincipal(Object principal) {
        this.principal = principal;
    }

    public Object getCredentials() {
        return credentials;
    }

    public void setCredentials(Object credentials) {
        this.credentials = credentials;
    }

    public LoginType getLoginType() {
        return loginType;
    }

    public void setLoginType(LoginType loginType) {
        this.loginType = loginType;
    }

    public SourceEnum getSource() {
        return source;
    }

    public void setSource(SourceEnum source) {
        this.source = source;
    }

    public String getIp() {
        return ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }
}
